package com.crawler.crawler.controller;

import com.crawler.crawler.domain.BookImportConfig;
import com.crawler.crawler.domain.BooksConfigs;
import com.crawler.crawler.service.BookImportConfigServer;
import com.crawler.crawler.service.IBooksConfigsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;
import java.util.Map;

@Controller
public class IndexController {

    @Autowired
    private IBooksConfigsService booksConfigsService;
    @GetMapping("/")
    public String index(Model model){
        BooksConfigs booksConfigs=new BooksConfigs();
        List<BooksConfigs> list=booksConfigsService.selectBooksConfigsList(booksConfigs);

        model.addAttribute("list",list);
        return "index";
    }


}
